<?php

namespace app\http\middleware;

class CkeckLogin
{
    public function handle($request, \Closure $next)
    {
        if (!session('?userinfo')) {
            return json(['code' => 4, 'msg' => '请登录', 'data' => '']);
        }
        return $next($request);
    }
}